<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta username="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      "use strict";
      // 箭头函数 this 查找本质上变量作用域的问题
      /*
        不能new
        没有aguments
        没有this
      */
      const user = {
        username: "jack",
        say() {
          console.log(this.username);
          const fn = () => {
            console.log(this.username);
          };
          fn();
        },
      };
      user.say();

      [1, 2, 3, 4].filter((el) => el % 2 === 0);
      [1, 2, 3, 4].reduce((sum, el) => sum + el, 0);
      [1, 2, 3, 4].sort((a, b) => a - b);
    </script>
  </body>
</html>
